package com.xuzm.demo.factorybean;

import org.springframework.beans.factory.FactoryBean;

/**
 * 实现FactoryBean，泛型为我们的测试类
 */
public class MyFactoryBean implements FactoryBean<MyTestBean> {
    @Override
    public MyTestBean getObject() throws Exception {
        // 直接返回Bean
        return new MyTestBean();
    }

    @Override
    public Class<?> getObjectType() {
        return MyTestBean.class;
    }
}
